<?php
	//include the initialization code
	require("inc/init_session.php");
	
	//include the mysql connection code
	require_once("inc/mysql_connect.php");
	
	//set the local current page variable
	$page = $_GET['page'];
	
	//set the page to home if the page isn't set
	if(!$page)
		$page = "home";
	
	//include the current information about the page user ect...
	require("inc/current_info.php");
	
	//include the standard configuration file
	require("inc/config.php");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Urghughuh | <? print($page) ?></title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
	<div id="wrapper">
		<div id="top">
		</div>
		<div id="content">
			<div id="header">
			Urghughuh
			</div>
			<div id="menu">
				<ul>
					<li><a href="?page=home">Home</a></li>
					<li><a href="?page=forum">Forum</a></li>
					<li><a href="?page=blog">Blog</a></li>
					<?php
						//if the viewer isn't a guest show the user panel
						if($user != "guest")
						{
							//if the user is an admin then show the admin tools
							if($admin == true)
							{
					?>
					<li><a href="?page=admin">Administrative Tools</a></li>
					<?php
							}
					?>
					<li><a href="?page=logout">Log Out</a></li>
					<?php
						}
						//else show the login and register link
						else
						{
					?>
					<li><a href="?page=login">Login</a></li>
					<li><a href="?page=register">Register</a></li>
					<?php
						}
					?>
				</ul>
			</div>
			<div id="stuff">
			<?php
				require("inc/pages.php");
			?>
			
			<br /><br />
			</div>
		</div>
		<div id="bottom">
		</div>
	</div>
</body>
</html>